home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 51 / 051.d81 / toy store (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  15KB  |  544 lines

  1. 10 ifa=0 then poke648,4:gosub53030
  2. 100 ifa=0thena=1:load"sprites",8,1
  3. 110 ifa=1thena=2:load"chars",8,1
  4. 120 print"  press any key when ready to continue"
  5. 130 geta$:ifa$=""then130
  6. 500 qo$="[151]@abcd[157][157][157][157][157]efghi[157][157][157][157][157]jklmn[157][157][157][157][157]opqrs"
  7. 501 q1$="[151]tuvwx[157][157][157][157][157]yz[\][157][157][157][157][157]^_!"+chr$(34):q2$="#[157][157][157][157][157]$%&'("
  8. 502 no$="[151])*+,[157][157][157][157]-./0[157][157][157][157]1234"
  9. 503 nr$="[151]5678[157][157][157][157]9:;<[157][157][157][157]=>[192][193]"
  10. 504 po$="[149][194][195][196][197][157][157][157][157][198][199][200][201][157][157][157][157][202][203][204][205]"
  11. 505 pr$="[149][206][207][208][209][157][157][157][157][210][211][212][213][157][157][157][157][214][215][216][217]"
  12. 506 do$="[151][218][219][220][221][157][157][157][157][255][160][161][162][157][157][157][157][163][164][165][166]"
  13. 507 dr$="[151][170][171][172][173][157][157][157][157][174][175][176][177][157][157][157][157][178][179][165][181]"
  14. 508 poke648,200:print"[147]             please wait...":poke648,4
  15. 1005 sm=51200:v=53248:print"[147]":poke53280,9:poke53281,15
  16. 1006 poke53272,(peek(53272)and240)or0
  17. 1007 poke56578,peek(56578)or3
  18. 1008 poke56576,(peek(56576)and252)or0
  19. 1009 poke53272,(peek(53272)and15)or32
  20. 1011 print"[147]       the screen has been moved."
  21. 1012 print"  to get things back to normal you"
  22. 1013 print"  need to type  poke648,4  and press"
  23. 1014 print"  return.  you will not see a cursor"
  24. 1015 print"  or what you are typing.":poke648,200
  25. 1020 gosub 51000 : rem sprite initialize
  26. 1025 gosub53000:rem sound
  27. 1043 rem      gosub41300:rem song
  28. 1050 gosub12000:rem select skill
  29. 1060 gosub13000:ifbg=1then1050:rem select level
  30. 1065 forpb=1to10:tr=-1
  31. 1070 gosub14000:rem select coin set
  32. 1080 onskgosub15000,20000,25000:rem skill sections
  33. 1083 iftrthengosub35000:rem re-inforce correct problem
  34. 1084 next
  35. 1085 gosub36000:rem report scores
  36. 1090 ifin$="p"thensc=0:goto1050
  37. 1095 gosub62000:goto1085
  38. 10000 :
  39. 10001 rem ***program flow subroutines***
  40. 11000 :
  41. 11001 rem title page
  42. 12000 :
  43. 12001 rem select skill
  44. 12005 gosub41000:rem build store
  45. 12010 pr$(0)="what skill shall we":pr$(1)="practice?"
  46. 12015 pr$(2)="press 1, 2, 3 or q."
  47. 12020 gosub44000:rem print prompt
  48. 12025 print"[144]1. name and tell value of one coin.
  49. 12030 [153]"2. tell value of a group of coins"
  50. 12035 [153]"that are all the same kind."
  51. 12040 [153]"3. tell the value of a mixed group"
  52. 12045 [153]"of coins."
  53. 12046 [153]"q. quit to loadstar."
  54. 12060 [153]"1 is easiest - 3 is hardest "
  55. 12100 [151]198,0
  56. 12103 [161]in$:[139]in$[178]""[167]12103
  57. 12104 [139] in$[178]"q" [167] [141] 62000:[137] 12025
  58. 12105 [139]in$[179]"1"[176]in$[177]"3"[167][141]49050:[137]12100:[143] wrong sound
  59. 12110 sk[178][197](in$)
  60. 12115 [141]49000:[143] right sound
  61. 12999 [142]
  62. 13000 bg[178]0
  63. 13001 [143] select level
  64. 13005 [141]41000:[143] build store
  65. 13010 pr$(0)[178]"what coins shall we":pr$(1)[178]"work with?"
  66. 13015 pr$(2)[178]"press 1, 2, 3 or q."
  67. 13020 [141]44000:[143] print prompt
  68. 13025 [153]"1. nickels and pennies"
  69. 13030 [153]"2. dimes, nickels and pennies"
  70. 13035 [153]"3. quarters, dimes, nickels and"
  71. 13040 [153]"pennies"
  72. 13041 [153]"q. quit to previous menu."
  73. 13100 [151]198,0
  74. 13103 [161]in$:[139]in$[178]""[167]13103
  75. 13104 [139] in$[178]"q" [167] bg[178]1:[142]
  76. 13105 [139]in$[179]"1"[176]in$[177]"3"[167][141]49050:[137]13100:[143] wrong sound
  77. 13110 lv[178][197](in$)
  78. 13115 [141]49000:[143] right sound
  79. 13999 [142]
  80. 14000 :
  81. 14001 [143] choose coin set
  82. 14005 [129]c2[178]0[164]3:cn(c2)[178]0:[130]
  83. 14010 [145]sk[141]14100,14200,14300
  84. 14015 ct[178]cn(0)[170]cn(1)[170]cn(2)[170]cn(3)
  85. 14020 [139]ct[178]0[176]ct[177]14[167]14000
  86. 14025 [129]d2[178]0[164]3:cs(d2)[178]cn(d2):[130]:ts[178]ct
  87. 14030 [142]
  88. 14100 :
  89. 14101 [143] skill 1 coin
  90. 14105 cn([181]([187](1)[172](lv[170]1)))[178]1
  91. 14110 [142]
  92. 14200 :
  93. 14201 [143] skill 2 coins
  94. 14205 cn([181]([187](1)[172](lv[170]1)))[178][181]([187](1)[172]3)[170]2
  95. 14210 [142]
  96. 14300 :
  97. 14301 [143] skill 3 & 4 coins
  98. 14305 [129]c3[178]0[164]lv
  99. 14310 cn(c3)[178][181]([187](1)[172]5)
  100. 14315 [130]
  101. 14325 [142]
  102. 14700 :
  103. 14701 [143] wait screen
  104. 14705 [151]53280,3:[151]53281,3:[153][199](142)
  105. 15000 :
  106. 15001 [143] skill:name and give value of single coin
  107. 15020 [141]41000:[143] build store
  108. 15030 [141]45000:[143] place coin subset
  109. 15050 [141]15500:[143] ask name of coin
  110. 15080 [139][168]rw[167]tr[178]0:[141]16000:[137]15020:[143] wrong
  111. 15085 [141]49000:[143] right sound
  112. 15090 [141]16500:[143] ask value of coin
  113. 15105 [141]48500:[143] check value
  114. 15110 [139][168]rw[167]tr[178]0:[141]17000:[137]15020:[143] wrong
  115. 15115 [141]49000:[143] right sound
  116. 15249 [142]
  117. 15500 :
  118. 15501 [143] ask name of coin
  119. 15505 pr$(0)[178]"what do we call this":pr$(1)[178]"coin? (return quits)":pr$(2)[178]""
  120. 15510 [141]44000:[143] print prompts
  121. 15515 [153]"on";
  122. 15520 [141]46000:[139]an$[178]""[167] [141] 63000
  123. 15525 [145]c5[170]1[141]15550,15600,15650,15700
  124. 15530 [142]
  125. 15550 :
  126. 15551 [143] penny or cent
  127. 15555 se$[178]"pen":[141]47000:[139]rw[167]15599
  128. 15560 se$[178]"cent":[141]47000:[139]rw[167]15599
  129. 15565 se$[178]"sent":[141]47000
  130. 15599 [142]
  131. 15600 :
  132. 15601 [143] nickel
  133. 15605 se$[178]"nic":[141]47000:[139]rw[167]15649
  134. 15610 se$[178]"nik":[141]47000
  135. 15649 [142]
  136. 15650 :
  137. 15651 [143] dime
  138. 15655 se$[178]"dim":[141]47000:[142]
  139. 15700 :
  140. 15701 [143] quarter
  141. 15705 se$[178]"q":[141]47000:[139]rw[178][171]1[167]15720
  142. 15710 se$[178]"kw":[141]47000:[139]rw[178][171]1[167]15720
  143. 15715 se$[178]"cw":[141]47000
  144. 15720 [139][168]rw[167]15730
  145. 15725 se$[178]"ter":[141]47000
  146. 15730 [142]
  147. 16000 :
  148. 16001 [143] if name incorrect
  149. 16003 [141]49050:[143] wrong sound
  150. 16005 [141]41000:[143] build shop
  151. 16010 sp[178]692:[145]c5[170]1[141]42500,42300,42700,42100
  152. 16015 sp[178]699:[145]c5[170]1[141]42600,42400,42800,42200
  153. 16020 pr$(0)[178]"no, this is called":pr$(2)[178]"press key to try again."
  154. 16025 [139]c5[178]0[167]pr$(1)[178]"a penny or cent."
  155. 16030 [139]c5[178]1[167]pr$(1)[178]"a nickel."
  156. 16035 [139]c5[178]2[167]pr$(1)[178]"a dime."
  157. 16040 [139]c5[178]3[167]pr$(1)[178]"a quarter."
  158. 16045 [141]44000:[143] print prompts
  159. 16050 [161]in$:[139]in$[178]""[167]16050
  160. 16055 [142]
  161. 16500 :
  162. 16501 [143] ask value of coin
  163. 16505 pr$(0)[178]"that's right!":pr$(1)[178]"now tell me what it's":pr$(2)[178]"worth."
  164. 16510 [141]44000:[143] print prompts
  165. 16515 [141]48000:[143] input value
  166. 16525 [142]
  167. 17000 :
  168. 17001 [143] if value incorrect
  169. 17003 [141]49050:[143] wrong sound
  170. 17005 [141]41000:[143] build shop
  171. 17010 sp[178]692:[145]c5[170]1[141]42500,42300,42700,42100
  172. 17015 sp[178]699:[145]c5[170]1[141]42600,42400,42800,42200
  173. 17020 [139]c5[178]0[167]pr$(0)[178]"no, a penny or cent is":pr$(1)[178]"worth one cent."
  174. 17025 [139]c5[178]0[167]pr$(2)[178]"1^    $.01    $0.01"
  175. 17030 [139]c5[178]1[167]pr$(0)[178]"no, a nickel is":pr$(1)[178]"worth five cents."
  176. 17035 [139]c5[178]1[167]pr$(2)[178]"5^    $.05    $0.05"
  177. 17040 [139]c5[178]2[167]pr$(0)[178]"no, a dime is":pr$(1)[178]"worth ten cents."
  178. 17045 [139]c5[178]2[167]pr$(2)[178]"10^    $.10    $0.10"
  179. 17050 [139]c5[178]3[167]pr$(0)[178]"no, a quarter is worth":pr$(1)[178]"twenty-five cents."
  180. 17055 [139]c5[178]3[167]pr$(2)[178]"25^    $.25    $0.25"
  181. 17060 [141]44000:[143] print prompts
  182. 17065 [161]in$:[139]in$[178]""[167]17065
  183. 17070 [142]
  184. 20000 :
  185. 20001 [143] skill: give value of set of like coins
  186. 20020 [141]41000:[143] build store
  187. 20030 [141]45000:[143] place coin subset
  188. 20040 [141]21500:[143] ask value
  189. 20050 [141]48500:[143] check value
  190. 20060 [139][168]rw[167]tr[178]0:[141]49050:[141]22000:[137]20000:[143] wrong
  191. 20065 [141]49000:[143] right sound
  192. 20249 [142]
  193. 21500 :
  194. 21501 [143] ask for value
  195. 21505 pr$(0)[178]"what are these coins":pr$(1)[178]"worth all together?":pr$(2)[178]""
  196. 21507 [139]ts[178]1[167]pr$(0)[178]"what is this":pr$(1)[178]"coin worth?"
  197. 21510 [141]44000:[143] print prompts
  198. 21515 [141]48000:[143] input value
  199. 21525 [142]
  200. 22000 :
  201. 22001 [143] if value incorrect
  202. 22005 pr$(0)[178]"no.":pr$(1)[178]"press a key and we'll":pr$(2)[178]"try something easier."
  203. 22010 [141]44000:[143] print prompt
  204. 22015 [161]in$:[139]in$[178]""[167]22015
  205. 22020 [129]d1[178]0[164]